package com.yun.P2;

public class Test {
    public static void main(String[] args) {
        MyThread2 thread2 = new MyThread2();
        thread2.start();
        for(int i = 1;i<=10;i++){
            System.out.println("main thread:"+i);
            int time =(int)(Math.random()*1000);
            try {
                Thread.sleep(time);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
